package javase.ch03.tongxun.sync;

import java.util.concurrent.TimeUnit;

public class Consumer implements Runnable{
    private House house;
    public Consumer(House house) {
        this.house = house;
    }
    @Override
    public void run() {
        for (int i = 0; i < 15; i++){
            house.sale();
            try {
                TimeUnit.MILLISECONDS.sleep(200);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
